#include "SearchWindow.h"
#include "ui_SearchWindow.h"
#include <QDebug>

#include "ScheduleWindow.h"

SearchWindow::SearchWindow(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::SearchWindow)
{
    ui->setupUi(this);

    QDate date = QDate::currentDate();
    ui->dateEditBegin->setDate(date);
    ui->dateEditEnd->setDate(QDate(date.year(), date.month(), date.daysInMonth()));

    connect(ui->btnSearch, SIGNAL(clicked()), this, SLOT(searchSchedule()));
}

SearchWindow::~SearchWindow()
{
    delete ui;
}

void SearchWindow::searchSchedule()
{
    qDebug() << "search!";
    ScheduleWindow::showSchedule(this);
}
